<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>机构团队</title>
    <%@ include file="../../../common/meta.jsp" %>
    <%@ include file="../../../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/common-body.css?t=${now}" rel="stylesheet">
    <script src="${ctx}/js/common/common-body.js?t=${now}"></script>
    <script src="${ctx}/js/plugins/jquery.ajaxfileupload-2.1.js"></script>
    <script src="${ctx}/js/imageview/jquery.photo.gallery.js?t=${now}"></script>
    <script>
        var oneOrgTeamInfo = ${oneOrgTeamInfo};
        var searchInfo = ${searchInfo};
        var imgSrcDefault="${ctx}/images/main/default.jpg";
        var sexMap = '${sexMap}';
        var docProfessionMap = '${docProfessionMap}';
        var mediLevelList = '${mediLevelList}';
        var certificateTypeList = '${certificateTypeList}';
        var type = '${type}';
        var page = '${page}';
    </script>
</head>
<body class="gray-bg">
<div class="myContent">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>${not empty onePfCheckDataLog && onePfCheckDataLog.operateType != 'add'? '编辑' : '新增'}机构团队</h5>
                </div>
                <c:if test="${type == 'info' && page != 1}">
                    <div class="ibox-content">
                        <form class="form-horizontal m-t">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">审核结果：</label>
                                <label class="col-sm-8 control-label control-label-content">${not empty onePfCheckDataLog && onePfCheckDataLog.result == 'pass'? '通过' : '不通过'}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">审核说明：</label>
                                <label class="col-sm-8 control-label control-label-content">${not empty onePfCheckDataLog?onePfCheckDataLog.remark : ''}</label>
                            </div>
                        </form>
                    </div>
                </c:if>
                <div class="ibox-title-2">
                    <h5><i class="fa fa-file-text"></i>  基本信息</h5>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="mainForm" novalidate="novalidate">
                        <input type="hidden" id="batchId" name="batchId" class="form-control" value="${not empty onePfCheckDataLog?onePfCheckDataLog.batchId : ''}">
                        <input type="hidden" id="checkId" name="checkId" class="form-control" value="${not empty onePfCheckDataLog?onePfCheckDataLog.id : ''}">
                        <input type="hidden" id="teamId" name="teamId" class="form-control" value="${not empty onePfCheckDataLog?onePfCheckDataLog.bizId : ''}">
                        <input type="hidden" id="id" name="id" class="form-control" value="${not empty oneOrgTeamInfo?oneOrgTeamInfo.id : ''}">
                        <input type="hidden" id="teamCode" name="teamCode" class="form-control" value="${not empty oneOrgTeamInfo?oneOrgTeamInfo.teamCode : ''}">
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && (onePfCheckDataLog.operateType != 'add' && oneOrgTeamInfo.orgCode != oneBeforeOrgTeamInfo.orgCode) ? 'hasChange' : ''}"><span style="color: red"></span>机构名称：</label>
                            <label class="col-sm-8 control-label control-label-content">${not empty oneOrgTeamInfo?oneOrgTeamInfo.orgName : ''}</label>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && (onePfCheckDataLog.operateType != 'add' && oneOrgTeamInfo.teamName != oneBeforeOrgTeamInfo.teamName) ? 'hasChange' : ''}"><span style="color: red">*</span>团队名称：</label>
                            <label class="col-sm-8 control-label control-label-content">${not empty oneOrgTeamInfo?oneOrgTeamInfo.teamName : ''}</label>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && (onePfCheckDataLog.operateType != 'add' && oneOrgTeamInfo.contactPhone != oneBeforeOrgTeamInfo.contactPhone) ? 'hasChange' : ''}"><span style="color: red"></span>联系电话：</label>
                            <label class="col-sm-8 control-label control-label-content">${not empty oneOrgTeamInfo?oneOrgTeamInfo.contactPhone : ''}</label>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && (onePfCheckDataLog.operateType != 'add' && oneOrgTeamInfo.sortNum != oneBeforeOrgTeamInfo.sortNum) ? 'hasChange' : ''}"><span style="color: red"></span>排序：</label>
                            <label class="col-sm-8 control-label control-label-content">${not empty oneOrgTeamInfo?oneOrgTeamInfo.sortNum : ''}</label>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && onePfCheckDataLog.operateType != 'add' && not empty oneOrgTeamInfo.teamDoctorList && oneOrgTeamInfo.teamDoctorList.size() > 0 ? 'hasChange' : ''}"><span style="color: red">*</span>团队成员：</label>
                            <label class="col-sm-8 control-label control-label-content">
                                <c:if test="${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && not empty oneOrgTeamInfo.teamDoctorList && oneOrgTeamInfo.teamDoctorList.size() > 0}">
                                    <c:forEach items="${oneOrgTeamInfo.teamDoctorList}" var="item">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label ${item.operateType != 'add' && (item.operateType == 'edit') ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}"><span style="color: red"></span>${not empty item?item.roleName : ''}：</label>
                                            <label class="col-sm-3 control-label control-label-content ${item.operateType != 'add' && (item.operateType == 'edit') ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">${not empty item?item.docName : ''}</label>
                                            <div class="col-sm-1 tip"></div>
                                            <label class="col-sm-2 control-label ${item.operateType != 'add' && (item.operateType == 'edit') ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}"><span style="color: red"></span>排序：</label>
                                            <label class="col-sm-3 control-label control-label-content ${item.operateType != 'add' && (item.operateType == 'edit') ? 'hasChange' : (item.operateType == 'del' ? 'isDelete' : '')}">${not empty item?item.sortNum : ''}</label>
                                            <div class="col-sm-1 tip"></div>
                                        </div>
                                    </c:forEach>
                                </c:if>
                            </label>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && (onePfCheckDataLog.operateType != 'add' && oneOrgTeamInfo.teamIntroduction != oneBeforeOrgTeamInfo.teamIntroduction) ? 'hasChange' : ''}"><span style="color: red"></span>团队介绍：</label>
                            <label class="col-sm-8 control-label control-label-content">${not empty oneOrgTeamInfo?oneOrgTeamInfo.teamIntroduction : ''}</label>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ${not empty oneOrgTeamInfo && not empty onePfCheckDataLog && (onePfCheckDataLog.operateType != 'add' && oneOrgTeamInfo.teamLogo != oneBeforeOrgTeamInfo.teamLogo) ? 'hasChange' : ''}"><span style="color: red"></span>团队缩略图：</label>
                            <div class="col-sm-8">
                                <img style="float:left;" id="teamLogo" src="${not empty oneOrgTeamInfo && not empty oneOrgTeamInfo.teamLogo?oneOrgTeamInfo.teamLogo:ctx.concat('/images/main/default.jpg')}" onclick='$.openPhotoGallery(this)' alt="团队缩略图" class="img-rounded win-img gallery-pic">
                            </div>
                            <div class="col-sm-1 tip"></div>
                        </div>
                        <div class="form-group" id="_btnDiv">
                            <div class="col-sm-4 col-sm-offset-4">
                                <c:if test="${type=='check'}">
                                    <input type="button" class="btn btn-info" id="submitBtn" onclick="openViewPage()" value="扫码预览">
                                </c:if>
                                <input type="button" class="btn btn-white" id="cancelBtn" onclick="doBack()" value="返回">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<%--<div id="scanQrCodePage" class="modal" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header text-center">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4>扫码预览</h4>
            </div>
            <div class="modal-body modal-body-height">
                <div class="row">
                    <div class="col-sm-12 text-center"><image class="login-scancode" id="scanCode" style="height: auto; width: 250px"/></div>
                    <div class="col-sm-12 text-center">提示：验证发布内容准确性，上线更放心</div>
                    <div class="col-sm-12 text-center">二维码有效期为<span id="_validNum"></span>秒</div>
                </div>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button class="btn btn-info" onclick="doPass()">通过</button>
                <button class="btn btn-danger" onclick="openDoUnPassPage()">不通过</button>
                <button class="btn btn-white" onclick="$('#scanQrCodePage').modal('hide')">取消</button>
            </div>
        </div>
    </div>
</div>--%>

<div id="unPassModal" class="modal" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 id="_modelTitle2" style="text-align: center; font-weight: normal;">审核不通过</h4>
            </div>
            <div class="modal-body modal-body-height">
                <form class="form-horizontal m-t">
                    <div class="form-group">
                        <label class="col-sm-12 control-label" style="text-align: left;"><span style="color: red">*</span>请输入审核不通过原因（必填）：</label>
                    </div>
                    <div class="form-group">
                        <textarea id="reason" name="reason" style="height: 120px; resize: none; width: 100%;" maxlength="1024"></textarea>
                    </div>
                </form>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button class="btn btn-primary" onclick="doUnPass()">确定</button>
                <button class="btn btn-white" onclick="closeUnPassModal();">取消</button>
            </div>
        </div>
    </div>
</div>

<script src="${ctx}/js/check/orgTeam/win/checkOrgTeamMgr.js?t=${now}"></script>
<script src="${ctx}/js/common/upLoadingFileSize.js?t=${now}"></script>
</body>
</html>
